home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume1 / torch / part04 < prev    next >
Encoding:
Internet Message Format  |  1993-04-28  |  6.8 KB

  1. From: mikew@wyse.wyse.com (Mike Wexler)
  2. Newsgroups: comp.sources.x
  3. Subject: v01i065:  torch: dialog utilities, Part04/04
  4. Message-ID: <1738@wyse.wyse.com>
  5. Date: 12 Oct 88 18:42:52 GMT
  6. Approved: mikew@wyse.com
  7.  
  8. Submitted-by: gary@torch.UUCP (Gary Henderson)
  9. Posting-number: Volume 1, Issue 65
  10. Archive-name: torch/part04
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 4 (of 4)."
  19. # Contents:  alert.1
  20. # Wrapped by mikew@wyse on Wed Oct 12 11:38:42 1988
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. if test -f 'alert.1' -a "${1}" != "-c" ; then 
  23.   echo shar: Will not clobber existing file \"'alert.1'\"
  24. else
  25. echo shar: Extracting \"'alert.1'\" \(5187 characters\)
  26. sed "s/^X//" >'alert.1' <<'END_OF_FILE'
  27. X.TH ALERT 1 "3 October 1988" "X Version 11"
  28. X.SH NAME
  29. Xalert \- display a warning message in a window
  30. X.SH SYNOPSIS
  31. X.B alert
  32. X[
  33. X.B \-z
  34. X] 
  35. X[
  36. X.B \-standard X Toolkit options \.\.\.
  37. X] "\fBTITLE\fP"
  38. X.B text to be displayed
  39. X.SH DESCRIPTION
  40. X.I Alert
  41. Xis a utility to issue a warning message to the user. It displays a warning
  42. Xsymbol, some justified text and a button in a window.  The button should be
  43. Xclicked with the mouse to acknowledge the alert and close the window.
  44. X.PP
  45. XIf the connection to the X server cannot be established, the title and text is
  46. Xprinted on \fIalert\fP's standard output and the user is requested to press
  47. X\fIRETURN\fP to acknowledge the message.
  48. X.PP
  49. X.I Alert
  50. Xcan take the following option:
  51. X.TP 8
  52. X.B -z
  53. XNo Zoom.  The window will attempt to by pass the window manager and appear
  54. Ximmediately, rather than going through the window manager's placement and
  55. Xsizing scheme.
  56. X.PP
  57. X\fIAlert\fP additionally recognizes the following standard X Toolkit command
  58. Xline arguments:
  59. X.TP 8
  60. X.B \-bg \fIcolour\fP \fRor\fP \-background \fIcolour\fP
  61. XThis option specifies the colour to use for the background of the window and
  62. Xwidgets.  The default is `white.'
  63. X.TP 8
  64. X.B \-bd \fIcolour\fP \fRor\fP \-bordercolor \fIcolour\fP
  65. XThis option specifies the colour to use for the border of the main window.
  66. XThe default is `black.'
  67. X.TP 8
  68. X.B \-bw \fInumber\fP \fRor\fP \-borderwidth \fInumber\fP
  69. XThis option specifies the width in pixels of the border surrounding the main
  70. Xwindow. 
  71. X.TP 8
  72. X.B \-fg \fIcolour\fP \fRor\fP \-foreground \fIcolour\fP
  73. XThis option specifies the colour to use for all text and symbols.  The default
  74. Xis `black'.
  75. X.TP 8
  76. X.B \-fn \fIfont\fP
  77. XThis option specifies the font to be used for displaying the text warning
  78. Xmessage.  The default is `serif10'.
  79. X.TP 8
  80. X.B \-name \fIname\fP
  81. XThis option specifies the application name under which resources are to be
  82. Xobtained, rather than the default executable file name, `alert'.
  83. X.TP 8
  84. X.B \-geometry \fIgeometry\fP
  85. XThis option specifies the preferred size and position of the alert window; see
  86. X\fIX(1)\fP; 
  87. X.TP 8
  88. X.B \-display \fIdisplay\fP
  89. XThis option specifies the X server to contact; see \fIX(1)\fP.
  90. X.TP 8
  91. X.B \-xrm \fIresourcestring\fP
  92. XThis option specifies a resource string to be used.  This is especially
  93. Xuseful for setting resources that do not have separate command line options.
  94. X.SH "X DEFAULTS"
  95. X\fIAlert\fP is implemented using the Athena widgets.  Each widget can
  96. Xindividually or in groups have various visual and operational aspects changed
  97. Xvia a `.Xdefaults' file on the client machine or the `RESOURCE_MANAGER'
  98. Xproperty on the server.  All widgets have a common set of resources
  99. X(background, backgroundPixmap, etc.) and resources unique to each type of
  100. Xwidget; a `command button' widget, for example, also has a cursor resource.
  101. XFor a full list see the document \fIX Toolkit Widgets - C Language X
  102. XInterface\fP.
  103. X.PP
  104. XThe path names and types of all widgets used by \fIalert\fP are as follows:
  105. X.TP 8
  106. X.B "\fIXXX\fP.alert/yorn"
  107. XThe widget that is a child of root.  All the other widgets used by the alert
  108. Xbox are children or grand children of this widget. 
  109. X.TP 8
  110. X.B "\fIXXX\fP.alert/yorn.contents"
  111. XA form widget that manages the layout of the alert box.  Normally completely
  112. Xcovers the alert/yorn widget.
  113. X.TP 8
  114. X.B "\fIXXX\fP.alert/yorn.contents.symbol"
  115. XA widget to display the alert symbol.
  116. X.TP 8
  117. X.B "\fIXXX\fP.alert/yorn.contents.ok/yes button"
  118. XA command button widget to obtain an acknowledgement from the user, normally
  119. Xdisplaying an `equals' symbol.
  120. X.TP 8
  121. X.B "\fIXXX\fP.alert/yorn.contents.message"
  122. XA widget to display and format the text message.
  123. X.PP
  124. XThe `\fIXXX\fP' may be replaced by either \fIalert\fP's classname, `Xopentop',
  125. Xor its application name, `alert'.
  126. X.PP
  127. XAdditionally, the following items are also fetched from the resource database:
  128. X.TP 8
  129. X.B "alertsym"
  130. XThe pathname of a bitmap file to use as an alternative to the
  131. X`exclamation-mark-in-a-triangle' symbol displayed in the `symbol' widget.
  132. X.TP 8
  133. X.B "oksym"
  134. XThe pathname of a bitmap file to use as an alternative to the `equals' symbol
  135. Xdisplayed in the `ok/yes button' widget.
  136. X.TP 8
  137. X.B "backgroundPixmap.foreground"
  138. XOne of two colours (the other is the widget's background colour) required when
  139. Xconverting a bitmap file into a pixmap for use as the widget's background
  140. Xpixmap. 
  141. X.SH RETURN CODES
  142. X.IP
  143. X0 \- Termination via the acknowledge box.
  144. X.IP
  145. X2 \- Termination due to some internal error.
  146. X.SH ENVIRONMENT
  147. X.TP 8
  148. XDISPLAY - the default host name and display number of the X server.
  149. X.TP 8
  150. XXENVIRONMENT - the name of the Xdefaults file to use, normally 
  151. X$HOME/.Xdefaults.
  152. X.SH EXAMPLES
  153. X.IP
  154. Xalert "Low disk space" Warning: There are less than 200 free disk blocks
  155. X.PP
  156. XWill open an alert box with the title
  157. X.I Low disk space
  158. Xand containing the text
  159. X.I Warning: There are less than 200 free disk blocks
  160. X.SH FILES
  161. X$HOME/.Xdefaults
  162. X/usr/lib/X11/app-defaults/Xopentop
  163. X.SH SEE ALSO
  164. Xgs(1), yorn(1)
  165. X.SH BUGS
  166. X.PP
  167. XIf the font is too large or the message too long, the text will be clipped.
  168. X.PP
  169. XThe title may not be displayed if the window manager does not provide title
  170. Xbars around windows or the \fB\-z\fP option is used.
  171. X.SH AUTHOR
  172. XGary Henderson & Mark E. Howells, Torch Computers Ltd.
  173. END_OF_FILE
  174. if test 5187 -ne `wc -c <'alert.1'`; then
  175.     echo shar: \"'alert.1'\" unpacked with wrong size!
  176. fi
  177. # end of 'alert.1'
  178. fi
  179. echo shar: End of archive 4 \(of 4\).
  180. cp /dev/null ark4isdone
  181. MISSING=""
  182. for I in 1 2 3 4 ; do
  183.     if test ! -f ark${I}isdone ; then
  184.     MISSING="${MISSING} ${I}"
  185.     fi
  186. done
  187. if test "${MISSING}" = "" ; then
  188.     echo You have unpacked all 4 archives.
  189.     rm -f ark[1-9]isdone
  190. else
  191.     echo You still need to unpack the following archives:
  192.     echo "        " ${MISSING}
  193. fi
  194. ##  End of shell archive.
  195. exit 0
  196. -- 
  197. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  198. Moderator of comp.sources.x
  199.